import React from 'react';
import PropTypes from 'prop-types';
import BaseComponent from '../../components/common/baseComponent.js';
import { Modal } from 'ywen-mobile-ui';


class WillPage extends BaseComponent {
    static propTypes = {
        clickFunc: PropTypes.func,
        closeFunc: PropTypes.func,
        show: PropTypes.bool.isRequired,
    }
    activeFunc=()=>{
        const { clickFunc } = this.props;
        clickFunc();
    }
    closeFunc=()=>{
        const { closeFunc } = this.props;
        closeFunc();
    }
    render() {
    const { show } = this.props;
    if (!show) {
      return null;
    }
        return (
            <Modal >
            <div className='info-modal'>
            <div className='info-banner'>
            <div className='info-title'>您有<span className='big-num'>5</span>张现金券</div>
            <div className='info-tip'>激活机会1个月后即将过期</div>
            </div>
            <div  className='info-body'>
            <div className='title'>尊敬的保驾车服用户</div>
            <div className='text-left'>您的车险1个月后到期，仍有5张现金券未激活，平安车险专线<span className='info-tel'>“95512”</span>为您服务，请注意接听。
            </div>
            <div className='text-left'> 购买车险即可激活并获得更多优惠。</div>
            <div className='info-flex'>
            <div className='info-btn'  onClick={this.closeFunc}>再考虑一下</div><div className='info-btn active' onClick={this.activeFunc}>我要激活</div>
            </div>
            </div>

            <div className='info-shadow'></div>
            </div>
            </Modal>
         )
    }

}

export default WillPage;